package com.ckf.serene.service;

import com.alipay.api.response.AlipayTradeFastpayRefundQueryResponse;
import com.alipay.api.response.AlipayTradeQueryResponse;
import com.alipay.api.response.AlipayTradeRefundResponse;
import com.ckf.serene.domain.AliPayParam;
import com.ckf.serene.domain.AliPayRefundParam;

import javax.servlet.http.HttpServletRequest;

/**
 * 支付宝服务类
 *
 * @author serence
 * @date 2021/11/6 23:39
 */
public interface AliPayService {

    /**
     * 支付宝APP支付
     *
     * @param aliPayParam 支付宝参数类
     * @return
     */
    public String aliPayAPPToPay(AliPayParam aliPayParam);

    /**
     * 查询支付宝订单
     *
     * @param aliPayParam 支付宝参数类
     * @return
     */
    public AlipayTradeQueryResponse queryAliPayOrder(AliPayParam aliPayParam);

    /**
     * 支付宝退款
     *
     * @param payRefund 支付宝退款参数类
     * @return
     */
    public AlipayTradeRefundResponse aliPayRefund(AliPayRefundParam payRefund);

    /**
     * 查询支付宝退款订单
     *
     * @param payRefund 支付宝退款参数类
     * @return
     */
    public AlipayTradeFastpayRefundQueryResponse aliPayRefundQuery(AliPayRefundParam payRefund);

    /**
     * 支付宝支付、退款成功回调
     *
     * @param request 回调内容
     */
    public Integer aliPayNotify(HttpServletRequest request);

}
